package cn.com.stary1993.delayqueue.redis.consumer;

import cn.com.stary1993.delayqueue.redis.support.RedisConsumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class TestConsumer1 implements RedisConsumer {
    @Override
    public String getKey() {
        return "1";
    }

    @Override
    public void handle(Object data, ZSetOperations<String, Object> zSet) {
        log.info(this.getClass().getName()+"【key="+getKey()+"】===>" + data);
        zSet.remove(getKey(),data);
    }
}
